﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataAccess;
namespace BussinessObjects
{
    public class TeamManager
    {
        DataAccess.TeamDataAccess teamDA;
        public IQueryable<String> GetTeams()
        {
            teamDA = new TeamDataAccess();
            return teamDA.GetTeams();
        }

        public List<TeamPlayerViewModel> GetPlayers(int seasonID, string teamName)
        {
            teamDA = new TeamDataAccess();
            return teamDA.GetTeamMembers(seasonID, teamName);
        }

        public IQueryable<PlayerScore> GetPlayerScore(int seasonID, int crewID)
        {
            teamDA = new TeamDataAccess();
            return teamDA.GetPlayerScore(crewID, seasonID);
        }

        public Team TeamsDetails(string teamName)
        {
            teamDA = new TeamDataAccess();
            return teamDA.TeamDetails(teamName);
        }

    }

    public class FixtureManager
    {
        DataAccess.FixtureDataAccess fixtureDA;
        public IEnumerable<DataAccess.FixtureModel> GetFixtures(int seasonID)
        {
            fixtureDA = new FixtureDataAccess();
            return fixtureDA.GetFixtures(seasonID);
        }
    }


}
